package thread;

import com.sun.xml.internal.ws.addressing.WsaActionUtil;

public class CurrentThreadDemo {
    public static void main(String[] args) {
        Thread main=Thread.currentThread();
        System.out.println("主线程："+main);
        doSome();//主线程执行doSome方法

    }
    public static void doSome(){
        Thread t=Thread.currentThread();//获取执行doSome方法线程
        System.out.println("执行doSome方法的线程是："+t);
    }
}
